﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Web.Security;
using SIMCObjetoNegocio;

namespace WcfServicioSeguridad
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        void Iniciar();
        [OperationContract]
        bool ValidarUsuario(string login, string pass);
        [OperationContract]
         string ApplicationName();
        [OperationContract]
         bool ChangePassword(string username, string oldPassword, string newPassword);
        [OperationContract]
         bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer);
        [OperationContract]
         bool CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
        [OperationContract]
        bool CreateUsuario(string username,
                                           string password,
                                           string email,
                                           string passwordQuestion,
                                           string passwordAnswer,
                                           bool isApproved,
                                           object providerUserKey,
                                           string telefono,
                                           string Nombre,
                                           string Apellido);
        [OperationContract]
         bool DeleteUser(string username, bool deleteAllRelatedData);
        [OperationContract]
         bool EnablePasswordReset();
        [OperationContract]
         bool EnablePasswordRetrieval();
        [OperationContract]
         int GetNumberOfUsersOnline();
        [OperationContract]
         string GetPassword(string username, string answer);
        [OperationContract]
         int MaxInvalidPasswordAttempts();
        [OperationContract]
         int MinRequiredNonAlphanumericCharacters();
        [OperationContract]
         int MinRequiredPasswordLength();
        [OperationContract]
         int PasswordAttemptWindow();
        [OperationContract]
         MembershipPasswordFormat PasswordFormat();
        [OperationContract]
         string PasswordStrengthRegularExpression();
        [OperationContract]
         bool RequiresQuestionAndAnswer();
        [OperationContract]
         bool RequiresUniqueEmail();
        [OperationContract]
         string ResetPassword(string username, string answer);
        [OperationContract]
         bool UnlockUser(string userName);
        [OperationContract]
         void BloquearUsuario(string nombreUsuario);
        [OperationContract]
         void DesbloquearUsuario(string nombreUsuario);
        [OperationContract]
         void ValidatePassword(string password, string username);
        [OperationContract]
        Usuario GetUsuario(string login, bool userIsOnline);
        [OperationContract]
         List<Usuario> GetUsuarioPorLogin(string Login);
        [OperationContract]
         List<Usuario> GetUsuarioPorEmail(string Email);
        [OperationContract]
         List<Usuario> GetUsuariosPorNombre(string Nombre);
        [OperationContract]
        void UpdateUsuario(Usuario user);

        [OperationContract]
        CompositeType GetDataUsingDataContract(CompositeType composite);
    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }
}
